package com.nt;

public class jiekou implements Runnable{
	public String name;
	public jiekou(String name){
		this.name=name;
	}
	public void run(){
		for(int i=0;i<10;i++){
			System.out.println(i+" "+name);
			try{
				Thread.currentThread().sleep((int)(Math.random()*1000));
			}catch(InterruptedException e){}
		}
		System.out.println("yes@!"+name);
	}
	public static void main(String[] args) {
		jiekou j = new jiekou("one");
		jiekou k = new jiekou("two");
		Thread t1 = new Thread(j);
		Thread t2 = new Thread(k);
		t1.start();
		t2.start();
	}
}

